<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let name = "Jack";
        let age = 20;        
        // 普通写法
        let user1 = {name:name, age:age};
        console.log(user1);
        // ES6写法
        let user2 = {name, age};
        console.log(user2);

    </script>
</head>
<body>
    
</body>
</html>